.class public Lcom/glympse/android/glympse/ViewSearch$SearchAutoCompleteAdapter;
.super Landroid/widget/CursorAdapter;
.source "ViewSearch.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/glympse/android/glympse/ViewSearch;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x9
    name = "SearchAutoCompleteAdapter"
.end annotation


# static fields
.field private static final ms_astrMatrixColumns:[Ljava/lang/String;


# instance fields
.field private m_oContentResolver:Landroid/content/ContentResolver;


# direct methods
.method static constructor <clinit>()V
    .locals 3

    .prologue
    .line 464
    const/4 v0, 0x6

    new-array v0, v0, [Ljava/lang/String;

    const/4 v1, 0x0

    .line 465
    const-string v2, "_id"

    aput-object v2, v0, v1

    const/4 v1, 0x1

    .line 466
    const-string v2, "kind"

    aput-object v2, v0, v1

    const/4 v1, 0x2

    .line 467
    const-string v2, "name"

    aput-object v2, v0, v1

    const/4 v1, 0x3

    .line 468
    const-string v2, "address"

    aput-object v2, v0, v1

    const/4 v1, 0x4

    .line 469
    const-string v2, "latitude"

    aput-object v2, v0, v1

    const/4 v1, 0x5

    .line 470
    const-string v2, "longitude"

    aput-object v2, v0, v1

    .line 463
    sput-object v0, Lcom/glympse/android/glympse/ViewSearch$SearchAutoCompleteAdapter;->ms_astrMatrixColumns:[Ljava/lang/String;

    .line 461
    return-void
.end method

.method public constructor <init>(Landroid/content/Context;)V
    .locals 1
    .parameter "oContext"

    .prologue
    .line 478
    invoke-static {}, Lcom/glympse/android/glympse/ViewSearch$SearchAutoCompleteAdapter;->CreateInitialCursor()Landroid/database/Cursor;

    move-result-object v0

    invoke-direct {p0, p1, v0}, Landroid/widget/CursorAdapter;-><init>(Landroid/content/Context;Landroid/database/Cursor;)V

    .line 473
    const/4 v0, 0x0

    iput-object v0, p0, Lcom/glympse/android/glympse/ViewSearch$SearchAutoCompleteAdapter;->m_oContentResolver:Landroid/content/ContentResolver;

    .line 479
    invoke-virtual {p1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v0

    iput-object v0, p0, Lcom/glympse/android/glympse/ViewSearch$SearchAutoCompleteAdapter;->m_oContentResolver:Landroid/content/ContentResolver;

    .line 480
    invoke-static {}, Lcom/glympse/android/glympse/ContactsHelper;->Initialize()V

    .line 481
    return-void
.end method

.method private static CreateInitialCursor()Landroid/database/Cursor;
    .locals 9

    .prologue
    const/4 v8, 0x1

    .line 486
    const/4 v1, 0x0

    .line 487
    .local v1, oMatrixCursor:Landroid/database/MatrixCursor;
    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v3

    iget-object v3, v3, Lcom/glympse/platform/Platform;->m_oPlaceList:Lcom/glympse/platform/common/PlaceList;

    iget-object v3, v3, Lcom/glympse/platform/common/PlaceList;->m_listPlaces:Lcom/glympse/platform/GVector$Places;

    invoke-virtual {v3}, Lcom/glympse/platform/GVector$Places;->isEmpty()Z

    move-result v3

    if-nez v3, :cond_1

    .line 489
    new-instance v1, Landroid/database/MatrixCursor;

    .end local v1           #oMatrixCursor:Landroid/database/MatrixCursor;
    sget-object v3, Lcom/glympse/android/glympse/ViewSearch$SearchAutoCompleteAdapter;->ms_astrMatrixColumns:[Ljava/lang/String;

    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v4

    iget-object v4, v4, Lcom/glympse/platform/Platform;->m_oPlaceList:Lcom/glympse/platform/common/PlaceList;

    iget-object v4, v4, Lcom/glympse/platform/common/PlaceList;->m_listPlaces:Lcom/glympse/platform/GVector$Places;

    invoke-virtual {v4}, Lcom/glympse/platform/GVector$Places;->size()I

    move-result v4

    invoke-direct {v1, v3, v4}, Landroid/database/MatrixCursor;-><init>([Ljava/lang/String;I)V

    .line 490
    .restart local v1       #oMatrixCursor:Landroid/database/MatrixCursor;
    const/4 v0, 0x0

    .line 491
    .local v0, nId:I
    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v3

    iget-object v3, v3, Lcom/glympse/platform/Platform;->m_oPlaceList:Lcom/glympse/platform/common/PlaceList;

    iget-object v3, v3, Lcom/glympse/platform/common/PlaceList;->m_listPlaces:Lcom/glympse/platform/GVector$Places;

    invoke-virtual {v3}, Lcom/glympse/platform/GVector$Places;->iterator()Ljava/util/Iterator;

    move-result-object v3

    :cond_0
    :goto_0
    invoke-interface {v3}, Ljava/util/Iterator;->hasNext()Z

    move-result v4

    if-nez v4, :cond_2

    .line 505
    .end local v0           #nId:I
    :cond_1
    return-object v1

    .line 491
    .restart local v0       #nId:I
    :cond_2
    invoke-interface {v3}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Lcom/glympse/platform/common/Place;

    .line 493
    .local v2, oPlace:Lcom/glympse/platform/common/Place;
    iget-object v4, v2, Lcom/glympse/platform/common/Place;->m_strName:Ljava/lang/String;

    invoke-static {v4}, Lcom/glympse/platform/common/Helpers;->IsEmpty(Ljava/lang/String;)Z

    move-result v4

    if-nez v4, :cond_0

    .line 495
    const/4 v4, 0x6

    new-array v4, v4, [Ljava/lang/Object;

    const/4 v5, 0x0

    .line 496
    add-int/lit8 v0, v0, 0x1

    invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v6

    aput-object v6, v4, v5

    .line 497
    invoke-static {v8}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v5

    aput-object v5, v4, v8

    const/4 v5, 0x2

    .line 498
    iget-object v6, v2, Lcom/glympse/platform/common/Place;->m_strName:Ljava/lang/String;

    aput-object v6, v4, v5

    const/4 v5, 0x3

    .line 499
    const-string v6, ""

    aput-object v6, v4, v5

    const/4 v5, 0x4

    .line 500
    iget-wide v6, v2, Lcom/glympse/platform/common/Place;->m_dLatitude:D

    invoke-static {v6, v7}, Ljava/lang/Double;->valueOf(D)Ljava/lang/Double;

    move-result-object v6

    aput-object v6, v4, v5

    const/4 v5, 0x5

    .line 501
    iget-wide v6, v2, Lcom/glympse/platform/common/Place;->m_dLongitude:D

    invoke-static {v6, v7}, Ljava/lang/Double;->valueOf(D)Ljava/lang/Double;

    move-result-object v6

    aput-object v6, v4, v5

    .line 495
    invoke-virtual {v1, v4}, Landroid/database/MatrixCursor;->addRow([Ljava/lang/Object;)V

    goto :goto_0
.end method


# virtual methods
.method public bindView(Landroid/view/View;Landroid/content/Context;Landroid/database/Cursor;)V
    .locals 9
    .parameter "oView"
    .parameter "oContext"
    .parameter "oCursor"

    .prologue
    const/16 v8, 0xa

    const/4 v7, 0x2

    const/4 v6, 0x1

    const/4 v5, 0x0

    .line 518
    invoke-interface {p3, v6}, Landroid/database/Cursor;->getInt(I)I

    move-result v0

    .line 519
    .local v0, nKind:I
    invoke-interface {p3, v7}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v3

    .line 520
    .local v3, strName:Ljava/lang/String;
    const/4 v4, 0x3

    invoke-interface {p3, v4}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v2

    .line 522
    .local v2, strAddress:Ljava/lang/String;
    const v4, 0x7f0c0003

    invoke-virtual {p1, v4}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object p0

    .end local p0
    check-cast p0, Landroid/widget/ImageView;

    .line 523
    if-ne v7, v0, :cond_0

    const v4, 0x7f020091

    .line 522
    :goto_0
    invoke-virtual {p0, v4}, Landroid/widget/ImageView;->setImageResource(I)V

    .line 526
    const v4, 0x7f0c0004

    invoke-virtual {p1, v4}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object p0

    check-cast p0, Landroid/widget/TextView;

    invoke-virtual {p0, v3}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 528
    const v4, 0x7f0c0005

    invoke-virtual {p1, v4}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v1

    check-cast v1, Landroid/widget/TextView;

    .line 529
    .local v1, oTextView:Landroid/widget/TextView;
    invoke-static {v2}, Lcom/glympse/platform/common/Helpers;->IsEmpty(Ljava/lang/String;)Z

    move-result v4

    if-eqz v4, :cond_1

    .line 531
    invoke-virtual {p1, v5, v8, v5, v8}, Landroid/view/View;->setPadding(IIII)V

    .line 532
    const/16 v4, 0x8

    invoke-virtual {v1, v4}, Landroid/widget/TextView;->setVisibility(I)V

    .line 540
    :goto_1
    return-void

    .line 524
    .end local v1           #oTextView:Landroid/widget/TextView;
    :cond_0
    const v4, 0x7f020092

    goto :goto_0

    .line 536
    .restart local v1       #oTextView:Landroid/widget/TextView;
    :cond_1
    invoke-virtual {p1, v5, v6, v5, v6}, Landroid/view/View;->setPadding(IIII)V

    .line 537
    invoke-virtual {v1, v2}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 538
    invoke-virtual {v1, v5}, Landroid/widget/TextView;->setVisibility(I)V

    goto :goto_1
.end method

.method public bridge synthetic convertToString(Landroid/database/Cursor;)Ljava/lang/CharSequence;
    .locals 1
    .parameter

    .prologue
    .line 1
    invoke-virtual {p0, p1}, Lcom/glympse/android/glympse/ViewSearch$SearchAutoCompleteAdapter;->convertToString(Landroid/database/Cursor;)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public convertToString(Landroid/database/Cursor;)Ljava/lang/String;
    .locals 1
    .parameter "oCursor"

    .prologue
    .line 545
    const/4 v0, 0x2

    invoke-interface {p1, v0}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method

.method public newView(Landroid/content/Context;Landroid/database/Cursor;Landroid/view/ViewGroup;)Landroid/view/View;
    .locals 3
    .parameter "oContext"
    .parameter "oCursor"
    .parameter "oParent"

    .prologue
    .line 511
    invoke-static {p1}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;

    move-result-object v0

    .line 512
    .local v0, inflater:Landroid/view/LayoutInflater;
    const v1, 0x7f030001

    const/4 v2, 0x0

    invoke-virtual {v0, v1, p3, v2}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;

    move-result-object v1

    return-object v1
.end method

.method public runQueryOnBackgroundThread(Ljava/lang/CharSequence;)Landroid/database/Cursor;
    .locals 19
    .parameter "oConstraint"

    .prologue
    .line 552
    if-eqz p1, :cond_0

    invoke-interface/range {p1 .. p1}, Ljava/lang/CharSequence;->length()I

    move-result v2

    if-gtz v2, :cond_1

    .line 554
    :cond_0
    new-instance v2, Landroid/database/MatrixCursor;

    sget-object v3, Lcom/glympse/android/glympse/ViewSearch$SearchAutoCompleteAdapter;->ms_astrMatrixColumns:[Ljava/lang/String;

    invoke-direct {v2, v3}, Landroid/database/MatrixCursor;-><init>([Ljava/lang/String;)V

    .line 642
    :goto_0
    return-object v2

    .line 557
    :cond_1
    const/4 v12, 0x0

    .line 561
    .local v12, oMatrixCursor:Landroid/database/MatrixCursor;
    :try_start_0
    invoke-interface/range {p1 .. p1}, Ljava/lang/CharSequence;->toString()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/String;->toLowerCase()Ljava/lang/String;

    move-result-object v15

    .line 570
    .local v15, strConstraint:Ljava/lang/String;
    const/4 v2, 0x2

    new-array v6, v2, [Ljava/lang/String;

    const/4 v2, 0x0

    .line 571
    new-instance v3, Ljava/lang/StringBuilder;

    const/16 v4, 0x2a

    invoke-static {v4}, Ljava/lang/String;->valueOf(C)Ljava/lang/String;

    move-result-object v4

    invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v3, v15}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    const/16 v4, 0x2a

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    aput-object v3, v6, v2

    const/4 v2, 0x1

    .line 572
    new-instance v3, Ljava/lang/StringBuilder;

    const/16 v4, 0x2a

    invoke-static {v4}, Ljava/lang/String;->valueOf(C)Ljava/lang/String;

    move-result-object v4

    invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v3, v15}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v3

    const/16 v4, 0x2a

    invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    aput-object v3, v6, v2

    .line 576
    .local v6, astrWhereArgs:[Ljava/lang/String;
    move-object/from16 v0, p0

    iget-object v0, v0, Lcom/glympse/android/glympse/ViewSearch$SearchAutoCompleteAdapter;->m_oContentResolver:Landroid/content/ContentResolver;

    move-object v2, v0

    .line 577
    sget-object v3, Lcom/glympse/android/glympse/ContactsHelper;->ms_uriAddress:Landroid/net/Uri;

    .line 578
    sget-object v4, Lcom/glympse/android/glympse/ContactsHelper;->ms_astrAddressColumns:[Ljava/lang/String;

    .line 579
    sget-object v5, Lcom/glympse/android/glympse/ContactsHelper;->ms_strWhereGlobAddress:Ljava/lang/String;

    .line 580
    sget-object v7, Lcom/glympse/android/glympse/ContactsHelper;->ms_strOrderByAddress:Ljava/lang/String;

    .line 576
    invoke-virtual/range {v2 .. v7}, Landroid/content/ContentResolver;->query(Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;

    move-result-object v11

    .line 583
    .local v11, oCursorAddresses:Landroid/database/Cursor;
    new-instance v13, Landroid/database/MatrixCursor;

    sget-object v2, Lcom/glympse/android/glympse/ViewSearch$SearchAutoCompleteAdapter;->ms_astrMatrixColumns:[Ljava/lang/String;

    invoke-interface {v11}, Landroid/database/Cursor;->getCount()I

    move-result v3

    add-int/lit8 v3, v3, 0x10

    invoke-direct {v13, v2, v3}, Landroid/database/MatrixCursor;-><init>([Ljava/lang/String;I)V
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_1

    .line 585
    .end local v12           #oMatrixCursor:Landroid/database/MatrixCursor;
    .local v13, oMatrixCursor:Landroid/database/MatrixCursor;
    const/4 v9, 0x0

    .line 588
    .local v9, nId:I
    :try_start_1
    invoke-static {}, Lcom/glympse/platform/Platform;->instance()Lcom/glympse/platform/Platform;

    move-result-object v2

    iget-object v2, v2, Lcom/glympse/platform/Platform;->m_oPlaceList:Lcom/glympse/platform/common/PlaceList;

    iget-object v2, v2, Lcom/glympse/platform/common/PlaceList;->m_listPlaces:Lcom/glympse/platform/GVector$Places;

    invoke-virtual {v2}, Lcom/glympse/platform/GVector$Places;->iterator()Ljava/util/Iterator;

    move-result-object v2

    :cond_2
    :goto_1
    invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z

    move-result v3

    if-nez v3, :cond_7

    .line 603
    if-eqz v11, :cond_6

    invoke-interface {v11}, Landroid/database/Cursor;->moveToFirst()Z

    move-result v2

    if-eqz v2, :cond_6

    .line 607
    .end local v6           #astrWhereArgs:[Ljava/lang/String;
    :cond_3
    const/4 v2, 0x0

    invoke-interface {v11, v2}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v2

    invoke-static {v2}, Lcom/glympse/platform/common/Helpers;->SafeStr(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v18

    .line 608
    .local v18, strName:Ljava/lang/String;
    const/4 v2, 0x1

    invoke-interface {v11, v2}, Landroid/database/Cursor;->getInt(I)I

    move-result v10

    .line 609
    .local v10, nType:I
    const/4 v2, 0x2

    invoke-interface {v11, v2}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v17

    .line 610
    .local v17, strLabel:Ljava/lang/String;
    const/4 v2, 0x3

    invoke-interface {v11, v2}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v16

    .line 612
    .local v16, strData:Ljava/lang/String;
    invoke-static/range {v16 .. v16}, Lcom/glympse/platform/common/Helpers;->IsEmpty(Ljava/lang/String;)Z

    move-result v2

    if-nez v2, :cond_5

    .line 614
    invoke-static/range {v17 .. v17}, Lcom/glympse/platform/common/Helpers;->IsEmpty(Ljava/lang/String;)Z

    move-result v2

    if-eqz v2, :cond_4

    .line 616
    invoke-static {v10}, Lcom/glympse/android/glympse/ContactsHelper;->GetAddressLabel(I)Ljava/lang/String;

    move-result-object v17

    .line 619
    :cond_4
    const/4 v2, 0x6

    new-array v2, v2, [Ljava/lang/Object;

    const/4 v3, 0x0

    .line 620
    add-int/lit8 v9, v9, 0x1

    invoke-static {v9}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v4

    aput-object v4, v2, v3

    const/4 v3, 0x1

    .line 621
    const/4 v4, 0x2

    invoke-static {v4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v4

    aput-object v4, v2, v3

    const/4 v3, 0x2

    .line 622
    new-instance v4, Ljava/lang/StringBuilder;

    invoke-static/range {v18 .. v18}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v5

    invoke-direct {v4, v5}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-static/range {v17 .. v17}, Lcom/glympse/platform/common/Helpers;->IsEmpty(Ljava/lang/String;)Z

    move-result v5

    if-eqz v5, :cond_8

    const-string v5, ""

    :goto_2
    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    aput-object v4, v2, v3

    const/4 v3, 0x3

    .line 623
    aput-object v16, v2, v3

    const/4 v3, 0x4

    .line 624
    const-wide/16 v4, 0x0

    invoke-static {v4, v5}, Ljava/lang/Double;->valueOf(D)Ljava/lang/Double;

    move-result-object v4

    aput-object v4, v2, v3

    const/4 v3, 0x5

    .line 625
    const-wide/16 v4, 0x0

    invoke-static {v4, v5}, Ljava/lang/Double;->valueOf(D)Ljava/lang/Double;

    move-result-object v4

    aput-object v4, v2, v3

    .line 619
    invoke-virtual {v13, v2}, Landroid/database/MatrixCursor;->addRow([Ljava/lang/Object;)V

    .line 627
    :cond_5
    invoke-interface {v11}, Landroid/database/Cursor;->moveToNext()Z

    move-result v2

    .line 605
    if-nez v2, :cond_3

    .line 631
    .end local v10           #nType:I
    .end local v16           #strData:Ljava/lang/String;
    .end local v17           #strLabel:Ljava/lang/String;
    .end local v18           #strName:Ljava/lang/String;
    :cond_6
    if-eqz v11, :cond_a

    .line 633
    invoke-interface {v11}, Landroid/database/Cursor;->close()V
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0

    .line 634
    const/4 v11, 0x0

    move-object v12, v13

    .line 642
    .end local v9           #nId:I
    .end local v11           #oCursorAddresses:Landroid/database/Cursor;
    .end local v13           #oMatrixCursor:Landroid/database/MatrixCursor;
    .end local v15           #strConstraint:Ljava/lang/String;
    .restart local v12       #oMatrixCursor:Landroid/database/MatrixCursor;
    :goto_3
    if-nez v12, :cond_9

    new-instance v2, Landroid/database/MatrixCursor;

    sget-object v3, Lcom/glympse/android/glympse/ViewSearch$SearchAutoCompleteAdapter;->ms_astrMatrixColumns:[Ljava/lang/String;

    invoke-direct {v2, v3}, Landroid/database/MatrixCursor;-><init>([Ljava/lang/String;)V

    goto/16 :goto_0

    .line 588
    .end local v12           #oMatrixCursor:Landroid/database/MatrixCursor;
    .restart local v6       #astrWhereArgs:[Ljava/lang/String;
    .restart local v9       #nId:I
    .restart local v11       #oCursorAddresses:Landroid/database/Cursor;
    .restart local v13       #oMatrixCursor:Landroid/database/MatrixCursor;
    .restart local v15       #strConstraint:Ljava/lang/String;
    :cond_7
    :try_start_2
    invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v14

    check-cast v14, Lcom/glympse/platform/common/Place;

    .line 590
    .local v14, oPlace:Lcom/glympse/platform/common/Place;
    iget-object v3, v14, Lcom/glympse/platform/common/Place;->m_strName:Ljava/lang/String;

    invoke-static {v3}, Lcom/glympse/platform/common/Helpers;->IsEmpty(Ljava/lang/String;)Z

    move-result v3

    if-nez v3, :cond_2

    iget-object v3, v14, Lcom/glympse/platform/common/Place;->m_strName:Ljava/lang/String;

    invoke-virtual {v3}, Ljava/lang/String;->toLowerCase()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v3, v15}, Ljava/lang/String;->indexOf(Ljava/lang/String;)I

    move-result v3

    if-ltz v3, :cond_2

    .line 592
    const/4 v3, 0x6

    new-array v3, v3, [Ljava/lang/Object;

    const/4 v4, 0x0

    .line 593
    add-int/lit8 v9, v9, 0x1

    invoke-static {v9}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v5

    aput-object v5, v3, v4

    const/4 v4, 0x1

    .line 594
    const/4 v5, 0x1

    invoke-static {v5}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v5

    aput-object v5, v3, v4

    const/4 v4, 0x2

    .line 595
    iget-object v5, v14, Lcom/glympse/platform/common/Place;->m_strName:Ljava/lang/String;

    aput-object v5, v3, v4

    const/4 v4, 0x3

    .line 596
    const-string v5, ""

    aput-object v5, v3, v4

    const/4 v4, 0x4

    .line 597
    iget-wide v5, v14, Lcom/glympse/platform/common/Place;->m_dLatitude:D

    invoke-static {v5, v6}, Ljava/lang/Double;->valueOf(D)Ljava/lang/Double;

    move-result-object v5

    aput-object v5, v3, v4

    const/4 v4, 0x5

    .line 598
    iget-wide v5, v14, Lcom/glympse/platform/common/Place;->m_dLongitude:D

    invoke-static {v5, v6}, Ljava/lang/Double;->valueOf(D)Ljava/lang/Double;

    move-result-object v5

    aput-object v5, v3, v4

    .line 592
    invoke-virtual {v13, v3}, Landroid/database/MatrixCursor;->addRow([Ljava/lang/Object;)V
    :try_end_2
    .catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_0

    goto/16 :goto_1

    .line 637
    .end local v6           #astrWhereArgs:[Ljava/lang/String;
    .end local v14           #oPlace:Lcom/glympse/platform/common/Place;
    :catch_0
    move-exception v2

    move-object v8, v2

    move-object v12, v13

    .line 639
    .end local v9           #nId:I
    .end local v11           #oCursorAddresses:Landroid/database/Cursor;
    .end local v13           #oMatrixCursor:Landroid/database/MatrixCursor;
    .end local v15           #strConstraint:Ljava/lang/String;
    .local v8, e:Ljava/lang/Exception;
    .restart local v12       #oMatrixCursor:Landroid/database/MatrixCursor;
    :goto_4
    invoke-static {v8}, Lcom/glympse/platform/common/Helpers;->Log(Ljava/lang/Throwable;)V

    goto :goto_3

    .line 622
    .end local v8           #e:Ljava/lang/Exception;
    .end local v12           #oMatrixCursor:Landroid/database/MatrixCursor;
    .restart local v9       #nId:I
    .restart local v10       #nType:I
    .restart local v11       #oCursorAddresses:Landroid/database/Cursor;
    .restart local v13       #oMatrixCursor:Landroid/database/MatrixCursor;
    .restart local v15       #strConstraint:Ljava/lang/String;
    .restart local v16       #strData:Ljava/lang/String;
    .restart local v17       #strLabel:Ljava/lang/String;
    .restart local v18       #strName:Ljava/lang/String;
    :cond_8
    :try_start_3
    new-instance v5, Ljava/lang/StringBuilder;

    const-string v6, " ("

    invoke-direct {v5, v6}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    move-object v0, v5

    move-object/from16 v1, v17

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    const-string v6, ")"

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v5

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
    :try_end_3
    .catch Ljava/lang/Exception; {:try_start_3 .. :try_end_3} :catch_0

    move-result-object v5

    goto/16 :goto_2

    .end local v9           #nId:I
    .end local v10           #nType:I
    .end local v11           #oCursorAddresses:Landroid/database/Cursor;
    .end local v13           #oMatrixCursor:Landroid/database/MatrixCursor;
    .end local v15           #strConstraint:Ljava/lang/String;
    .end local v16           #strData:Ljava/lang/String;
    .end local v17           #strLabel:Ljava/lang/String;
    .end local v18           #strName:Ljava/lang/String;
    .restart local v12       #oMatrixCursor:Landroid/database/MatrixCursor;
    :cond_9
    move-object v2, v12

    .line 642
    goto/16 :goto_0

    .line 637
    :catch_1
    move-exception v2

    move-object v8, v2

    goto :goto_4

    .end local v12           #oMatrixCursor:Landroid/database/MatrixCursor;
    .restart local v9       #nId:I
    .restart local v11       #oCursorAddresses:Landroid/database/Cursor;
    .restart local v13       #oMatrixCursor:Landroid/database/MatrixCursor;
    .restart local v15       #strConstraint:Ljava/lang/String;
    :cond_a
    move-object v12, v13

    .end local v13           #oMatrixCursor:Landroid/database/MatrixCursor;
    .restart local v12       #oMatrixCursor:Landroid/database/MatrixCursor;
    goto/16 :goto_3
.end method
